﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Query2Object
{
    class OdbcContext:IDbContext
    {
        private string connectionstring;

        #region IDbContext 成员

        public ISession GetSession()
        {
            ISession sa = new OdbcSession();
            sa.Context = this;
            sa.Init(connectionstring);
            return sa;
        }

        public void Init()
        {
            throw new NotImplementedException("No Support yet");
        }

        public String ConnectionString
        {
            get
            {
                //throw new NotImplementedException();
                return connectionstring;
            }
            set
            {
                //throw new NotImplementedException();
                connectionstring = value;
            }
        }
        #endregion
    }
}
